import moviepy.editor as mp


# clip = mp.VideoFileClip("export.gif")
# clip.write_videofile("myvideo2.mp4")

def concatenate(video_clip_paths, output_path = "."):
    """Concatenates several video files into one video file
    and save it to `output_path`. Note that extension (mp4, etc.) must be added to `output_path`
    `method` can be either 'compose' or 'reduce':
        `reduce`: Reduce the quality of the video to the lowest quality on the list of `video_clip_paths`.
        `compose`: type help(concatenate_videoclips) for the info"""
    # create VideoFileClip object for each video file
    clips = [mp.VideoFileClip(c) for c in video_clip_paths]
    final_clip = mp.concatenate_videoclips(clips, method="compose")
    # write the output video file
    final_clip.write_videofile(output_path)
    
if __name__ == "__main__":
    concatenate(["myvideo.mp4", "myvideo2.mp4"], 'final_clip.mp4')